7d90f6090bb8fedddb72e12afa65f42ebb47ec1e,tetrad-lib/src/main/java/edu/cmu/tetrad/search/ConditionalGaussianLikelihood.java,ConditionalGaussianLikelihood,likelihoodJoint,#List#List#,187

Before Change


            if (X.size() > 0) {
                double v;

                try {

                    // Determinant will be zero if data are linearly dependent.
                    if (a <= continuousCols.length) {
                        throw new IllegalArgumentException();
                    }

                    TetradMatrix cov = cov(getSubsample(continuousCols, cell));
                    v = gaussianLikelihood(k, cov);

                    // Double check.
                    if (Double.isInfinite(v)) {
                        throw new IllegalArgumentException();
                    }

                    c2 += a * v;

After Change


            }

            if (X.size() > 0) {
                try {

                    // Determinant will be zero if data are linearly dependent.
                    if (a > continuousCols.length + 10) {
                        TetradMatrix cov = cov(getSubsample(continuousCols, cell));
                        c2 += a * gaussianLikelihood(k, cov);
                    } else {
                        TetradMatrix cov = cov(getSubsample(continuousCols, all));
                        c2 += a * gaussianLikelihood(k, cov);